package LeetCode;

import java.util.LinkedList;
import java.util.Queue;

public class LC171 {
    public int titleToNumber(String s) {
        int ans = 0;
        for (int i = 0; i < s.length(); i++) {
            char a = s.charAt(i);
            int m = a-'A'+1;
            ans = ans *26 + m;
        }
        return ans;
    }
}
